package cn.wolfcode.statusenum;

import lombok.Getter;

@Getter
public enum AppointmentStatusEnum {
    PEND(0,"待确认"),
    PERFORM(1,"履行中"),
    CONSUME(2,"消费中"),
    FINISH(3,"归档"),
    FAILURE(4,"废弃");

    private Integer value;
    private String name;
    AppointmentStatusEnum(Integer value,String name){
        this.name = name;
        this.value = value;
    }

    public static String getName(Integer value){

        AppointmentStatusEnum[] values = values();
        for (AppointmentStatusEnum appointmentStatusEnum : values){
            if (appointmentStatusEnum.value.equals(value)){
                return appointmentStatusEnum.name;
            }
        }
        return null;
    }
}
